<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "ks_survey".
 *
 * @property int $tid 出题人id
 * @property int $id 主键id，删除的时候用到
 * @property string $exampinfo 试卷内容
 * @property int $selscore 每道选择题分数
 * @property int $chescore 每道多选题分数
 * @property int $judscore 每道判断题分数
 * @property int $cmpscore 每道填空题分数
 * @property int $bosscore 每道问答(大)题分数
 * @property int $fullmarks 满分
 * @property int $timeout 考试时长(分钟)
 * @property int $overscore 几个分数
 * @property string $examname 试卷名
 * @property string $create_time
 */
class KsSurvey extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'ks_survey';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['tid', 'exampinfo', 'selscore', 'chescore', 'judscore', 'cmpscore', 'bosscore', 'timeout', 'overscore', 'examname'], 'required'],
            [['tid', 'selscore', 'chescore', 'judscore', 'cmpscore', 'bosscore', 'fullmarks', 'timeout', 'overscore'], 'integer'],
            [['exampinfo'], 'string'],
            [['create_time'], 'safe'],
            [['examname'], 'string', 'max' => 60],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'tid' => 'Tid',
            'id' => 'ID',
            'exampinfo' => 'Exampinfo',
            'selscore' => 'Selscore',
            'chescore' => 'Chescore',
            'judscore' => 'Judscore',
            'cmpscore' => 'Cmpscore',
            'bosscore' => 'Bosscore',
            'fullmarks' => 'Fullmarks',
            'timeout' => 'Timeout',
            'overscore' => 'Overscore',
            'examname' => 'Examname',
            'create_time' => 'Create Time',
        ];
    }
}
